#include "threadPool.h"
int threadPoolInit(threadPool_t *pthreadPool,int threadNum){
    bzero(pthreadPool,sizeof(threadPool_t));
    // 为tid数组申请内存
    pthreadPool->threadNum = threadNum;
    pthreadPool->tidArr = (pthread_t *)calloc(threadNum,sizeof(pthread_t));
    // 初始化任务队列当中的锁和条件变量
    pthread_mutex_init(&pthreadPool->taskQueue.mutex,NULL);
    pthread_cond_init(&pthreadPool->taskQueue.cond,NULL);
    return 0;
}
